<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Aria: ArModuleLoader Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Aria
   &#160;<span id="projectnumber">2.9.4</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classArModuleLoader.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-static-attribs">Static Protected Attributes</a> &#124;
<a href="classArModuleLoader-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ArModuleLoader Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Dynamic <a class="el" href="classArModule.html" title="Dynamicly loaded module base class, read warning in more. ">ArModule</a> loader.  
 <a href="classArModuleLoader.html#details">More...</a></p>

<p><code>#include &lt;ArModuleLoader.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a8476ad94124ffccd58cd3df75ccec10c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8476ad94124ffccd58cd3df75ccec10c"></a>
typedef void *&#160;</td><td class="memItemRight" valign="bottom"><b>DllRef</b></td></tr>
<tr class="separator:a8476ad94124ffccd58cd3df75ccec10c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98c3c3b3fa04816d2943582e373b63e4"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArModuleLoader.html#a98c3c3b3fa04816d2943582e373b63e4">Status</a> { <br />
&#160;&#160;<a class="el" href="classArModuleLoader.html#a98c3c3b3fa04816d2943582e373b63e4a936b7a8cc20cc46acdd970cf7efab64e">STATUS_SUCCESS</a> =0, 
<a class="el" href="classArModuleLoader.html#a98c3c3b3fa04816d2943582e373b63e4aee4f0363dc85d4044d6e025ff9b201bb">STATUS_ALREADY_LOADED</a>, 
<a class="el" href="classArModuleLoader.html#a98c3c3b3fa04816d2943582e373b63e4a9e0552cd4f9a42608051e62a98499a4d">STATUS_FAILED_OPEN</a>, 
<a class="el" href="classArModuleLoader.html#a98c3c3b3fa04816d2943582e373b63e4a2b4cfa6d997517ad6b77ca6a7883cd4d">STATUS_INVALID</a>, 
<br />
&#160;&#160;<a class="el" href="classArModuleLoader.html#a98c3c3b3fa04816d2943582e373b63e4a40e62c3cdbbadeb5b2c0efe69b8648ed">STATUS_INIT_FAILED</a>, 
<a class="el" href="classArModuleLoader.html#a98c3c3b3fa04816d2943582e373b63e4ab68f87a06fe705a7171a2248999bc1d7">STATUS_EXIT_FAILED</a>, 
<a class="el" href="classArModuleLoader.html#a98c3c3b3fa04816d2943582e373b63e4a748dad391df18837484389a9eee39eec">STATUS_NOT_FOUND</a>
<br />
 }</td></tr>
<tr class="separator:a98c3c3b3fa04816d2943582e373b63e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a07f8693efb31b83b1203690ff2e632b3"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classArModuleLoader.html#a98c3c3b3fa04816d2943582e373b63e4">Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArModuleLoader.html#a07f8693efb31b83b1203690ff2e632b3">close</a> (const char *modName, bool quiet=false)</td></tr>
<tr class="memdesc:a07f8693efb31b83b1203690ff2e632b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Close an <a class="el" href="classArModule.html" title="Dynamicly loaded module base class, read warning in more. ">ArModule</a>.  <a href="#a07f8693efb31b83b1203690ff2e632b3">More...</a><br /></td></tr>
<tr class="separator:a07f8693efb31b83b1203690ff2e632b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adcd0da65257d336589ed50ab6b9ebfee"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adcd0da65257d336589ed50ab6b9ebfee"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArModuleLoader.html#adcd0da65257d336589ed50ab6b9ebfee">closeAll</a> ()</td></tr>
<tr class="memdesc:adcd0da65257d336589ed50ab6b9ebfee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Close all open <a class="el" href="classArModule.html" title="Dynamicly loaded module base class, read warning in more. ">ArModule</a>. <br /></td></tr>
<tr class="separator:adcd0da65257d336589ed50ab6b9ebfee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a63d2b1e8a16c3ebc8e34482f72499b23"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classArModuleLoader.html#a98c3c3b3fa04816d2943582e373b63e4">Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArModuleLoader.html#a63d2b1e8a16c3ebc8e34482f72499b23">load</a> (const char *modName, <a class="el" href="classArRobot.html">ArRobot</a> *robot, void *modArgument=NULL, bool quiet=false)</td></tr>
<tr class="memdesc:a63d2b1e8a16c3ebc8e34482f72499b23"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load an <a class="el" href="classArModule.html" title="Dynamicly loaded module base class, read warning in more. ">ArModule</a>.  <a href="#a63d2b1e8a16c3ebc8e34482f72499b23">More...</a><br /></td></tr>
<tr class="separator:a63d2b1e8a16c3ebc8e34482f72499b23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa43852d5d5ebbecebf8595a5a32015c2"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classArModuleLoader.html#a98c3c3b3fa04816d2943582e373b63e4">Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArModuleLoader.html#aa43852d5d5ebbecebf8595a5a32015c2">reload</a> (const char *modName, <a class="el" href="classArRobot.html">ArRobot</a> *robot, void *modArgument=NULL, bool quiet=false)</td></tr>
<tr class="memdesc:aa43852d5d5ebbecebf8595a5a32015c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Close and then reload an <a class="el" href="classArModule.html" title="Dynamicly loaded module base class, read warning in more. ">ArModule</a>.  <a href="#aa43852d5d5ebbecebf8595a5a32015c2">More...</a><br /></td></tr>
<tr class="separator:aa43852d5d5ebbecebf8595a5a32015c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-static-attribs"></a>
Static Protected Attributes</h2></td></tr>
<tr class="memitem:aa2d8d708a37d723328fdba1ee4f5a7ec"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa2d8d708a37d723328fdba1ee4f5a7ec"></a>
static std::map&lt; std::string, DllRef &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>ourModMap</b></td></tr>
<tr class="separator:aa2d8d708a37d723328fdba1ee4f5a7ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Dynamic <a class="el" href="classArModule.html" title="Dynamicly loaded module base class, read warning in more. ">ArModule</a> loader. </p>
<p>The <a class="el" href="classArModuleLoader.html" title="Dynamic ArModule loader. ">ArModuleLoader</a> is used to load ArModules into a program and invoke them.</p>
<p>See also <a class="el" href="classArModule.html" title="Dynamicly loaded module base class, read warning in more. ">ArModule</a> to see how to define an <a class="el" href="classArModule.html" title="Dynamicly loaded module base class, read warning in more. ">ArModule</a>.</p>
<p>See also the example programs advanced/simpleMod.cpp and advanced/simpleModule.cpp. </p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="a98c3c3b3fa04816d2943582e373b63e4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classArModuleLoader.html#a98c3c3b3fa04816d2943582e373b63e4">ArModuleLoader::Status</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a98c3c3b3fa04816d2943582e373b63e4a936b7a8cc20cc46acdd970cf7efab64e"></a>STATUS_SUCCESS&#160;</td><td class="fielddoc">
<p>Load succeded. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a98c3c3b3fa04816d2943582e373b63e4aee4f0363dc85d4044d6e025ff9b201bb"></a>STATUS_ALREADY_LOADED&#160;</td><td class="fielddoc">
<p>Module already loaded. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a98c3c3b3fa04816d2943582e373b63e4a9e0552cd4f9a42608051e62a98499a4d"></a>STATUS_FAILED_OPEN&#160;</td><td class="fielddoc">
<p>Could not find or open the module. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a98c3c3b3fa04816d2943582e373b63e4a2b4cfa6d997517ad6b77ca6a7883cd4d"></a>STATUS_INVALID&#160;</td><td class="fielddoc">
<p>Invalid module file format. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a98c3c3b3fa04816d2943582e373b63e4a40e62c3cdbbadeb5b2c0efe69b8648ed"></a>STATUS_INIT_FAILED&#160;</td><td class="fielddoc">
<p>The module failed its init stage. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a98c3c3b3fa04816d2943582e373b63e4ab68f87a06fe705a7171a2248999bc1d7"></a>STATUS_EXIT_FAILED&#160;</td><td class="fielddoc">
<p>The module failed its exit stage. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a98c3c3b3fa04816d2943582e373b63e4a748dad391df18837484389a9eee39eec"></a>STATUS_NOT_FOUND&#160;</td><td class="fielddoc">
<p>The module was not found. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a07f8693efb31b83b1203690ff2e632b3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classArModuleLoader.html#a98c3c3b3fa04816d2943582e373b63e4">ArModuleLoader::Status</a> ArModuleLoader::close </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>modName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>quiet</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Close an <a class="el" href="classArModule.html" title="Dynamicly loaded module base class, read warning in more. ">ArModule</a>. </p>
<p>Calls <a class="el" href="classArModule.html#a6556f5f806fbbd4f25b0c6f0c2997984" title="Close down the module and have it exit. ">ArModule::exit()</a> on the module, then closes the library.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">modName</td><td>fileName of the module without the extension (.dll or .so) </td></tr>
    <tr><td class="paramname">quiet</td><td>whether to print out a message if this fails or not, defaults to false </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a63d2b1e8a16c3ebc8e34482f72499b23"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classArModuleLoader.html#a98c3c3b3fa04816d2943582e373b63e4">ArModuleLoader::Status</a> ArModuleLoader::load </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>modName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classArRobot.html">ArRobot</a> *&#160;</td>
          <td class="paramname"><em>robot</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>modArgument</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>quiet</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Load an <a class="el" href="classArModule.html" title="Dynamicly loaded module base class, read warning in more. ">ArModule</a>. </p>
<p>THIS ONLY LOADS one init on the module right now, if its called again it'll load the same init over.</p>
<p>I'll fix it later... read the more verbose description in ArModule.h.</p>
<p>Takes a string name of the module which is just the file name of the module without the extension (.dll or .so). It will figure out the correct extension based on wheter its a Linux or Windows build. It will also uses the standard operating systems ability to find the library. So the library must be located within the PATH variable for Windows and the LD_LIBRARY_PATH for Linux. You can also just give the absolute path to the library, or the relative path from the directory the program was started in (ie ./simpleMod). The <a class="el" href="classArModule.html" title="Dynamicly loaded module base class, read warning in more. ">ArModule</a> will be passed the <a class="el" href="classArRobot.html" title="Central class for communicating with and operating the robot. ">ArRobot</a> reference that <a class="el" href="classArModuleLoader.html#a63d2b1e8a16c3ebc8e34482f72499b23" title="Load an ArModule. ">load()</a> takes. This is the <a class="el" href="classArRobot.html" title="Central class for communicating with and operating the robot. ">ArRobot</a> that the <a class="el" href="classArModule.html" title="Dynamicly loaded module base class, read warning in more. ">ArModule</a> will use for its processing.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">modName</td><td>fileName of the module without the extension (.dll or .so)</td></tr>
    <tr><td class="paramname">robot</td><td><a class="el" href="classArRobot.html" title="Central class for communicating with and operating the robot. ">ArRobot</a> reference which the module is to use, this can be NULL</td></tr>
    <tr><td class="paramname">modArgument</td><td>A void pointer argument to pass to the module, if its a const value you'll need to cast it to a non-const value to get it to work (for example if you were using a constant string). This value defaults to NULL.</td></tr>
    <tr><td class="paramname">quiet</td><td>whether to print out a message if this fails or not, defaults to false </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="moduleExample_8cpp-example.html#a21">moduleExample.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="aa43852d5d5ebbecebf8595a5a32015c2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classArModuleLoader.html#a98c3c3b3fa04816d2943582e373b63e4">ArModuleLoader::Status</a> ArModuleLoader::reload </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>modName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classArRobot.html">ArRobot</a> *&#160;</td>
          <td class="paramname"><em>robot</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>modArgument</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>quiet</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Close and then reload an <a class="el" href="classArModule.html" title="Dynamicly loaded module base class, read warning in more. ">ArModule</a>. </p>
<p><a class="el" href="classArModuleLoader.html#aa43852d5d5ebbecebf8595a5a32015c2" title="Close and then reload an ArModule. ">reload()</a> is similar to <a class="el" href="classArModuleLoader.html#a63d2b1e8a16c3ebc8e34482f72499b23" title="Load an ArModule. ">load()</a>, except that it will call <a class="el" href="classArModuleLoader.html#a07f8693efb31b83b1203690ff2e632b3" title="Close an ArModule. ">close()</a> on the module and then call <a class="el" href="classArModuleLoader.html#a63d2b1e8a16c3ebc8e34482f72499b23" title="Load an ArModule. ">load()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">modName</td><td>fileName of the module without the extension (.dll or .so) </td></tr>
    <tr><td class="paramname">robot</td><td><a class="el" href="classArRobot.html" title="Central class for communicating with and operating the robot. ">ArRobot</a> instance to provide to the module </td></tr>
    <tr><td class="paramname">modArgument</td><td>application-specific data to provide to the module </td></tr>
    <tr><td class="paramname">quiet</td><td>If true, do not log errors. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>ArModuleLoader.h</li>
<li>ArModuleLoader.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classArModuleLoader.html">ArModuleLoader</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
